package de.tum.in.eist.im.client.Chat.ChatChannel;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

import de.tum.in.eist.im.shared.Message.Message;
import de.tum.in.eist.im.shared.User.User;


/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("chatMessageHandlerService")
public interface ChatMessageHandlerService extends RemoteService {
	
	// send message to the channel
	Boolean sendMessage(Message message);
	
	// get the messages of a channel
	Message[] getMessagesFromDatabase(Long chatChannelId);
	
	// user methods
	Boolean addUserAsOnline(User user, Long chatChannelId);
	Boolean addUserAsOnlineToPrivate(User user, Long chatChannelId);
	Boolean removeUserAsOnline(User user, Long chatChannelId);
	List<User> getOnlineUsersFromServer(Long chatChannelId);
}